﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Possan.IOC.Tests
{
	public class TestPlugRegistrar : ITypeRegistryLoader
	{
		#region IClassRegistry Members

		public void Initialize(TypeRegistry registry)
		{
			registry.RegisterSingleton(typeof(IPlug1), new TestPlug1());
			registry.Register(typeof(IPlug2), typeof(TestPlug2), ObjectScope.Local);

			registry.Register(typeof(IPlug3), typeof(TestPlug1), ObjectScope.Local);
			registry.Register(typeof(IPlug3), typeof(TestPlug2), ObjectScope.Local);

			registry.Register(typeof(IPlug2), typeof(TestPlug2), ObjectScope.SharedGlobal);

			registry.Register(typeof(IPlug3), typeof(TestPlug1), ObjectScope.SharedGlobal);
			registry.Register(typeof(IPlug3), typeof(TestPlug2), ObjectScope.SharedGlobal);
		}

		#endregion
	}
}
